package com.alipay.exception;

import com.alipay.model.enums.ResponseCodeEnum;
import lombok.Getter;

/**
 * @author Jun
 */
@Getter
public class BusinessException extends RuntimeException {
  /** 业务错误码 */
  protected int code;

  public BusinessException(ResponseCodeEnum responseCodeEnum) {
    this(responseCodeEnum.getCode(), responseCodeEnum.getMsg());
  }

  public BusinessException(int code, String message) {
    super(message);
    this.code = code;
  }
}
